In heat pumps according to the related art, to remove frost n on an outdoor heat exchanger that serves as an evaporator during a heating operation, a defrosting operation is performed by reversing the refrigeration cycle. However, this defrosting method compromises indoor comfort because heating is stopped during the defrosting operation. Accordingly, as a technology that enables a simultaneous heating operation and defrosting operation, there is a heat pump in which an outdoor heat exchanger is divided into a plurality of parallel heat exchangers with reference to a refrigerant flow diversion path, and a bypass that bypasses a discharge gas from a compressor, and a solenoid opening and closing valve that controls the bypass state are provided in each of those parallel heat exchangers (see, for example, Patent Literature 1). In this heat pump, a part of the refrigerant from the compressor is caused to enter each bypass alternately, and each parallel heat exchanger is defrosted alternately, thereby allowing heating to be performed continuously without reversing the refrigeration cycle.